home *** CD-ROM | disk | FTP | other *** search
/ Game Programming in C++ - Start to Finish / GameProgrammingS.iso / Peon / PeonSDK-Win32-1.0.0.exe / {app} / PeonMain / include / ISceneObject.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-11-25  |  1.9 KB  |  79 lines

  1.  
  2. #ifndef __ISCENEOBJECT_H_
  3. #define __ISCENEOBJECT_H_
  4. /*
  5. Peon - Win32 Games Programming Library
  6. Copyright (C) 2002-2005 Erik Yuzwa
  7.  
  8. This library is free software; you can redistribute it and/or
  9. modify it under the terms of the GNU Library General Public
  10. License as published by the Free Software Foundation; either
  11. version 2 of the License, or (at your option) any later version.
  12.  
  13. This library is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16. Library General Public License for more details.
  17.  
  18. You should have received a copy of the GNU Library General Public
  19. License along with this library; if not, write to the Free
  20. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  21.  
  22. Erik Yuzwa
  23. peon AT wazooinc DOT com
  24. */
  25.  
  26. #include "IUnknown.h"
  27. #include "Vector3.h"
  28.  
  29. namespace peon
  30. {
  31.     /**
  32.     * This base object for our scene 
  33.     */
  34.     class PEONMAIN_API ISceneObject : public IUnknown
  35.     {
  36.     public:
  37.         /** position in the game world */
  38.         Vector3        m_vecPos;
  39.  
  40.     public:
  41.         /**
  42.         * Constructor
  43.         */
  44.         ISceneObject(){}
  45.  
  46.         /**
  47.         * Destructor
  48.         */
  49.         virtual ~ISceneObject(){}
  50.  
  51.  
  52.         /**
  53.         * This method is used to update this particular node.
  54.         * Every object inherited from ISceneObject should try
  55.         * to override this method, as it allows it to be
  56.         * processed by any scene manager.
  57.         * @param fElapsedTime - elapsed time between frames
  58.         * @return void
  59.         */
  60.         virtual void onUpdate(float fElapsedTime){}
  61.  
  62.         /**
  63.         * This method can be used as a overrideable for
  64.         * rendering
  65.         * @return void
  66.         */
  67.         virtual void onRender(){}
  68.  
  69.         /**
  70.         * This method just sets our object's position
  71.         * @param newPos - Vector3 of the game world
  72.         * @return void
  73.         */
  74.         void setPos( Vector3 newPos ){ m_vecPos = newPos; }
  75.  
  76.     };
  77. }
  78.  
  79. #endif